export default class jingdutiao extends Laya.Script {
    // 更多参数说明请访问: https://ldc2.layabox.com/doc/?nav=zh-as-2-4-0
    
    constructor() { super(); }
    
    onAwake(){
        Laya.stage.on("start",this,function(){this.owner.value=0.5})
        Laya.stage.on("+",this,zhen);
        Laya.stage.on("-",this,jian);
    function zhen()
    {
        if (this.owner.value < 1)
        this.owner.value += 0.25;
        else if(this.owner.value == 1){
            Laya.stage.event("gamerover")
            Laya.stage.event("gamerover1")
        }
        
    }
    function jian()
    {
        if (this.owner.value > 0)
        this.owner.value -= 0.25;
        else if(this.owner.value == 0){
            Laya.stage.event("gamerover")
            Laya.stage.event("gamerover2")
        }
    }
}
}